#!/bin/bash
#180210 disconnect other ethernet interfaces if wifi already disconnected.
INTERFACE=`cat /etc/frisbee/interface`
. $FRISBEEFUNCDIR/func
INTERFACES=$(ifconfig | sed -n -e '/Ethernet/ N' -e '/^[^ ].*inet addr/ s/ .*// p')
if echo $INTERFACES | grep -qw "$INTERFACE"; then
 disconnect
else #disconnect other (wired) interfaces
 for INTERFACE in $INTERFACES;do
  dhcpcd -k $INTERFACE 
 done
fi
